# 页面类
import time
from Unit_01.Base import Base
from selenium.webdriver.common.by import By
class Page(Base):
    # 定位器
    # 输入框的定位
    search_loc =(By.ID,'kw')
    search_lo = (By.ID,'su')
    # 页面元素的封装
    # 对输入框的定位进行输入操作
    def search(self):
        self.find_element(self.search_loc).send_kes('web端自动化测试')
        self.send_keys(self.search_loc,'web端自动化测试')
        self.click(self.search_lo)
    # 业务逻辑
    def baidu_luoji(self):
        self.open_url('https://www.baidu.com/')
        time.sleep(2)
        self.search()
